<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="icon" href="https://static.nowcoder.com/images/logo_87_87.png"/>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
	<link rel="stylesheet" th:href="@{/css/global.css}" />
	<title>粉丝列表</title>
</head>
<body>
	<div class="nk-container">
		<!-- 头部 -->
		<header class="bg-dark sticky-top" th:replace="index::header">
		</header>

		<!-- 内容 -->
		<div class="main">
			<div class="container">
				<div class="position-relative">
					<!-- 选项 -->
					<ul class="nav nav-tabs mb-3">
						<li class="nav-item">
							<a class="nav-link position-relative" th:href="@{|/followeeDetail/${target.id}|}"><i class="text-info" th:utext="${target.id==loginUser.id?'我':target.username}">Nowcoder</i>的关注</a>
						</li>
						<li class="nav-item">
							<a class="nav-link position-relative active" th:href="@{|/followerDetail/3/${target.id}|}"><i class="text-info" th:utext="${target.id==loginUser.id?'我':target.username}">Nowcoder</i>的粉丝</a>
						</li>
					</ul>
					<a th:href="@{|/user/profile/${target.id}|}" class="text-muted position-absolute rt-0">个人主页&gt;</a>
				</div>
				<div th:if="${followerList.size()==0}" style="padding-top: 50px;padding-bottom: 50px;text-align: center">
					<span class="text-muted font-size-14" style="font-weight: lighter">空空如也~</span><br/>
					<img th:src="@{/img/nothing.png}" >
				</div>
				<!-- 粉丝列表 -->
				<ul class="list-unstyled">
					<li class="media pb-3 pt-3 mb-3 border-bottom position-relative" th:each="followerMap:${followerList}">
						<a th:href="@{|/user/profile/${followerMap.user.id}|}">
							<img th:src="${followerMap.user.headerUrl}" class="mr-4 rounded-circle user-header" alt="用户头像" >
						</a>
						<div class="media-body">
							<h6 class="mt-0 mb-3">
								<span class="text-success" th:utext="${followerMap.user.username}">落基山脉下的闲人</span>
								<span class="float-right text-muted font-size-12">关注于 <i th:text="${#dates.format(followerMap.followTime,'yyyy-MM-dd HH:mm:ss')}">2019-04-28 14:13:25</i></span>
							</h6>
							<div>
								<button th:if="${followerMap.user.id!=loginUser.id}" id="follow-btn" type="button" th:onclick="|follow(3,${followerMap.user.id});|" th:class="|btn btn-sm float-right follow-btn ${followerMap.followStatus==1?'btn-secondary':'btn-info'}|" th:text="${followerMap.followStatus==1?'已关注':'关注TA'}">关注TA</button>
							</div>
						</div>
					</li>
				</ul>
				<!-- 分页 -->
				<nav class="mt-5" th:replace="index::page">
				</nav>
			</div>
		</div>

		<!-- 尾部 -->
		<footer class="bg-dark" th:replace="index::footer">
		</footer>
	</div>

	<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script>
	<script th:src="@{/js/global.js}"></script>
	<script th:src="@{/js/profile.js}"></script>
</body>
</html>
